home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2000 September / september_2000.iso / intercd / root / ^Linux / Jooky / clockywock.c < prev    next >
Encoding:
C/C++ Source or Header  |  1999-11-01  |  322 b   |  20 lines

  1. #include "includes.h"
  2.  
  3. char *clockywock(int secs)
  4. {
  5.     int hh,mm,ss=0;
  6.  
  7.     char *hoser;
  8.     hoser=(char *)calloc(1,16);
  9.  
  10.     hh=secs/3600;
  11.     mm=(secs-(hh*3600))/60;
  12.     ss=(secs-(hh*3600)-(mm*60));
  13.     if (hh > 0)
  14.         sprintf (hoser,"%.2d:%.2d:%.2d",hh,mm,ss);
  15.     else
  16.         sprintf (hoser,"%.2d:%.2d",mm,ss);
  17.  
  18.     return hoser;
  19. }
  20.